Make GtkPasswordEntryBuffer public
authorMatthias Clasen <mclasen@redhat.com>
Tue, 8 Jun 2021 11:25:11 +0000 (11:25 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 8 Jun 2021 11:25:11 +0000 (11:25 +0000)
gtk/gtk.h
gtk/gtkpasswordentry.c
gtk/gtkpasswordentrybuffer.c
gtk/gtkpasswordentrybuffer.h [new file with mode: 0644]
gtk/gtkpasswordentrybufferprivate.h [deleted file]

index d5f50a86b39b8b2c37286e233164352b601cb82d..4d5dc5902d9c73cbc68379381bb24143deff0549 100644 (file)
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
 #include <gtk/gtkpaned.h>
 #include <gtk/gtkpapersize.h>
 #include <gtk/gtkpasswordentry.h>
+#include <gtk/gtkpasswordentrybuffer.h>
 #include <gtk/gtkpicture.h>
 #include <gtk/gtkpopover.h>
 #include <gtk/gtkpopovermenu.h>
index 1c11f5cb6a510c487a11c01b53b7b6b4504ec2e7..7e6e470dd76d6fa135fe4e5927c1e47f1ba37cc0 100644 (file)
@@ -31,7 +31,7 @@
 #include "gtkimage.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
-#include "gtkpasswordentrybufferprivate.h"
+#include "gtkpasswordentrybuffer.h"
 #include "gtkprivate.h"
 #include "gtkwidgetprivate.h"
 #include "gtkcsspositionvalueprivate.h"
index bbb51311c788f161578b90f14be9345f8a848c7d..4a36d07729fe496c5e5addd8402eab8f1b5706eb 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "config.h"
 
-#include "gtkpasswordentrybufferprivate.h"
+#include "gtkpasswordentrybuffer.h"
 
 #include "gtksecurememoryprivate.h"
 
 /* Initial size of buffer, in bytes */
 #define MIN_SIZE 16
 
+/**
+ * GtkPasswordEntryBuffer:
+ *
+ * A `GtkEntryBuffer` that locks the underlying memory to prevent it
+ * from being swapped to disk.
+ *
+ * `GtkPasswordEntry` uses a `GtkPasswordEntryBuffer`.
+ *
+ * Since 4.4.
+ */
 struct _GtkPasswordEntryBuffer
 {
   GtkEntryBuffer parent_instance;
@@ -192,7 +202,7 @@ gtk_password_entry_buffer_init (GtkPasswordEntryBuffer *self)
 {
 }
 
-/*< private >
+/**
  * gtk_password_entry_buffer_new:
  *
  * Creates a new `GtkEntryBuffer` using secure memory allocations.
diff --git a/gtk/gtkpasswordentrybuffer.h b/gtk/gtkpasswordentrybuffer.h
new file mode 100644 (file)
index 0000000..3ca2520
--- /dev/null
@@ -0,0 +1,35 @@
+/* gtkpasswordentrybufferprivate.h: Entry buffer using secure allocation
+ *
+ * Copyright 2020  GNOME Foundation
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <gtk/gtkentrybuffer.h>
+
+G_BEGIN_DECLS
+
+#define GTK_TYPE_PASSWORD_ENTRY_BUFFER (gtk_password_entry_buffer_get_type())
+
+GDK_AVAILABLE_IN_4_4
+G_DECLARE_FINAL_TYPE (GtkPasswordEntryBuffer, gtk_password_entry_buffer, GTK, PASSWORD_ENTRY_BUFFER, GtkEntryBuffer)
+
+GDK_AVAILABLE_IN_4_4
+GtkEntryBuffer *        gtk_password_entry_buffer_new   (void);
+
+G_END_DECLS
diff --git a/gtk/gtkpasswordentrybufferprivate.h b/gtk/gtkpasswordentrybufferprivate.h
deleted file mode 100644 (file)
index 2f6f1da..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* gtkpasswordentrybufferprivate.h: Entry buffer using secure allocation
- *
- * Copyright 2020  GNOME Foundation
- *
- * SPDX-License-Identifier: LGPL-2.1-or-later
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include <gtk/gtkentrybuffer.h>
-
-G_BEGIN_DECLS
-
-#define GTK_TYPE_PASSWORD_ENTRY_BUFFER (gtk_password_entry_buffer_get_type())
-
-G_DECLARE_FINAL_TYPE (GtkPasswordEntryBuffer, gtk_password_entry_buffer, GTK, PASSWORD_ENTRY_BUFFER, GtkEntryBuffer)
-
-GtkEntryBuffer *        gtk_password_entry_buffer_new   (void);
-
-G_END_DECLS